<template>
  <div id="custom">
    <div class="title-wrapper"><div class="pro">产品详情</div></div>
    <div class="content">
      <div>
        <h2>安全便捷的电子化签约服务</h2>
        <p>深耕电子签章领域多年、经历众多客户的产品打磨，泛微为您提供便捷、安全、有效的电子化签约产品和服务</p>
      </div>
      <div class="box">
        <div style="margin: 0 50px">
          <h1>{{item.name}}</h1>
          <div style="color: red;font-size: 30px">${{item.price}}</div>
         </div>
        <el-button type="primary"
                   @click="purchase"
                   style="width: 180px;height: 60px;margin-top: 20px">购买</el-button>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "CustomMade",
    data(){
      return{
        item:{
          name : '合同定制',
          price: 199
        },
        form:{}
      }
    },
    methods: {
      purchase() {
        if (sessionStorage.getItem('isLogin') === '0') {
          this.$router.push('/login')
        } else if (sessionStorage.getItem('userType') == 'server') {
          alert('您当前登录身份为服务方，无法下单。如需下单请退出系统使用采买方身份登录！')
        } else {
          this.form.ber_id = this.$store.getters.getInfo.ber_id
          this.form.or_kind = 1
          this.form.or_product = this.item.name
          this.form.or_money = this.item.price
          this.form.ser_id = ''
          this.form.or_pay = 0
          this.form.or_url = ''

          this.$router.push({
            name: 'Pay',
            params: {
              form: this.form
            }
          })
        }
      }
    }
  }
</script>

<style scoped>
  .pro{
    background-color: #ffffff;
    width: 200px;
    height: 40px;
    border-top: 4px solid #0d6eb8;
    color: #0d6eb8;
    font-size: 18px;
    line-height: 40px;
  }
  .content{
    text-align: left;
    padding: 20px;
    background: #fff;
    display: flex;
    justify-content: space-between;
  }
  .box{
    width: 400px;
    height: 300px;
    display: flex;
    /*background: #0d5cad;*/
    margin: 0 30px;
    border: 1px solid #c9d6e3;
    box-shadow: 0 0 5px #666;
    background: url("../../../assets/images/合同定制.png") no-repeat 0 120px;
    background-size: 400px 180px;
  }

</style>